package top.yifengxiner.framework.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import top.yifengxiner.framework.interceptor.TokenInterceptor;

/**
 * @author ：baixiao
 * @date ：Created in 2021/5/7 11:51
 * @description：WebMvcConfigurer配置
 * @modified By：
 * @version: 0.0.1$
 */
@Configuration
public class WebConfig implements WebMvcConfigurer
{
    @Autowired
    private TokenInterceptor tokenInterceptor;

    public void addInterceptors(InterceptorRegistry registry)
    {
        /*registry.addInterceptor(tokenInterceptor)
                .addPathPatterns("/**")
                .addPathPatterns("swagger-ui.html")
                .excludePathPatterns("/login")
                .excludePathPatterns("/register")
                .excludePathPatterns("/blockchain/educated_login")
                .excludePathPatterns("/blockchain/educator_login")
                .excludePathPatterns("/blockchain/educated/register")
                .excludePathPatterns("/blockchain/educator/register");*/
    }
}
